// *Author：jxx
// *Contact：283591387@qq.com
// *代码由框架生成,任何更改都可能导致被代码生成器覆盖
export default function(){
    const table = {
        key: 'BomDetailId',
                editTable:true ,
        footer: "Foots",
        cnName: 'Bom清单明细',
        name: 'MaterialBomDetail',
        newTabEdit: false,
        url: "/MaterialBomDetail/",
        sortName: "BomDetailId"
    };
    const tableName = table.name;
    const tableCNName = table.cnName;
    const newTabEdit = false;
    const key = table.key;
    const editFormFields = {"MaterialNo":"","MaterialName":"","Spec":"","MaterialTypeId":"","Position":"","UnitId":"","DepartmentId":[],"IsBackflush":"","IsLot":"","UnitQty":"","IsCriticalParts":"","IsSpecialParts":"","AttritionRate":"","Remark":"","NextBomNo":""};
    const editFormOptions = [[{"title":"子产品编码","required":true,"field":"MaterialNo","type":"selectTable"},
                               {"title":"产品名称","required":true,"field":"MaterialName","disabled":true,"type":"text"},
                               {"title":"规格","field":"Spec","disabled":true,"type":"text"},
                               {"title":"位置","field":"Position","type":"text"},
                               {"dataKey":"部门级联","data":[],"title":"部门","field":"DepartmentId","type":"cascader"},
                               {"dataKey":"是否","data":[],"title":"是否倒冲","field":"IsBackflush","type":"select"},
                               {"dataKey":"是否","data":[],"title":"启用批次","required":true,"field":"IsLot","type":"select"},
                               {"title":"单位用量","required":true,"field":"UnitQty","type":"decimal"},
                               {"dataKey":"是否","data":[],"title":"是关键件","required":true,"field":"IsCriticalParts","type":"select"},
                               {"dataKey":"是否","data":[],"title":"特殊关键件","required":true,"field":"IsSpecialParts","type":"select"},
                               {"title":"损耗率","required":true,"field":"AttritionRate","type":"decimal"},
                               {"title":"备注","field":"Remark","type":"text"},
                               {"title":"子件Bom编码","field":"NextBomNo","type":"selectTable"},
                               {"dataKey":"物料属性","data":[],"title":"产品类型","required":true,"field":"MaterialTypeId","type":"select"},
                               {"dataKey":"计量单位","data":[],"title":"计量单位","required":true,"field":"UnitId","type":"select"}]];
    const searchFormFields = {};
    const searchFormOptions = [];
    const columns = [{field:'BomDetailId',title:'Bom明细标识',type:'int',width:110,hidden:true,readonly:true,require:true,align:'left'},
                       {field:'BomId',title:'Bom标识',type:'int',width:110,hidden:true,align:'left'},
                       {field:'NextBomId',title:'子件Bom标识',type:'int',width:110,hidden:true,align:'left'},
                       {field:'MaterialId',title:'子产品标识',type:'int',width:110,hidden:true,require:true,align:'left'},
                       {field:'MaterialNo',title:'子产品编码',type:'string',width:110,edit:{type:'selectTable'},require:true,align:'left'},
                       {field:'MaterialName',title:'产品名称',type:'string',width:110,readonly:true,edit:{type:'text'},require:true,align:'left'},
                       {field:'Spec',title:'规格',type:'string',width:110,readonly:true,edit:{type:'text'},align:'left'},
                       {field:'MaterialTypeId',title:'产品类型',type:'int',bind:{ key:'物料属性',data:[]},width:80,edit:{type:'select'},require:true,align:'left'},
                       {field:'Position',title:'位置',type:'string',width:110,edit:{type:'text'},align:'left'},
                       {field:'UnitId',title:'计量单位',type:'int',bind:{ key:'计量单位',data:[]},width:80,edit:{type:'select'},require:true,align:'left'},
                       {field:'DepartmentId',title:'部门',type:'guid',bind:{ key:'部门级联',data:[]},width:110,edit:{type:'cascader'},align:'left'},
                       {field:'DepartmentName',title:'部门名称',type:'string',width:110,hidden:true,align:'left'},
                       {field:'IsBackflush',title:'是否倒冲',type:'int',bind:{ key:'是否',data:[]},width:110,edit:{type:'select'},align:'left'},
                       {field:'IsLot',title:'启用批次',type:'int',bind:{ key:'是否',data:[]},width:110,edit:{type:'select'},require:true,align:'left'},
                       {field:'UnitQty',title:'单位用量',type:'decimal',width:110,edit:{type:'decimal'},require:true,align:'left'},
                       {field:'IsCriticalParts',title:'是关键件',type:'int',bind:{ key:'是否',data:[]},width:110,edit:{type:'select'},require:true,align:'left'},
                       {field:'IsSpecialParts',title:'特殊关键件',type:'int',bind:{ key:'是否',data:[]},width:110,edit:{type:'select'},require:true,align:'left'},
                       {field:'AttritionRate',title:'损耗率',type:'decimal',width:110,edit:{type:'decimal'},require:true,align:'left'},
                       {field:'Remark',title:'备注',type:'string',width:110,edit:{type:'text'},align:'left'},
                       {field:'NextBomNo',title:'子件Bom编码',type:'string',width:120,edit:{type:'selectTable'},align:'left'}];
    const detail ={columns:[]};
    const details = [];

    return {
        table,
        key,
        tableName,
        tableCNName,
        newTabEdit,
        editFormFields,
        editFormOptions,
        searchFormFields,
        searchFormOptions,
        columns,
        detail,
        details
    };
}